<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>注册</title>
    <!-- 最新版本的 Bootstrap 核心 CSS 文件 -->
    <link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/3.4.1/css/bootstrap.min.css" integrity="sha384-HSMxcRTRxnN+Bdg0JdbxYKrThecOKuH5zCYotlSAcp1+c8xmyTe9GYg1l9a69psu" crossorigin="anonymous">
    <style>
        .account{
            width: 600px;
            margin: 0 auto;
        }
    </style>
</head>
<body>
<div class="account">
    <h1 style="text-align: center">注册</h1>
    <form>
        {% for field in form %}
            {% if field.name == 'code' %}
                  <div class="form-group">
                    <label for="{{ field.id_for_label }}">{{ field.label }}</label>
                      <div class="clearfix">
                        <div class="col-md-6" style="padding-left: 0px">{{ field}}</div>
                        <div class="col-md-6"><input type="button" class="btn btn-default" value="点击获取验证码"></div>
                      </div>
                  </div>
            {% else %}
                <div class="form-group">
                 <label for="{{ field.id_for_label }}">{{ field.label }}</label>
                 {{ field}}
                 </div>
            {% endif %}
        {% endfor %}
      <button type="submit" class="btn btn-primary">注 册</button>
    </form>
</div>
</body>
</html>